package com.itrui.feign.client;

import com.itrui.feign.client.common.Picture;
import com.itrui.feign.client.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@FeignClient("uploadservice")
public interface PictureClient {
    @GetMapping("/picture/{id}/{type}")
    public List<Picture> getPicture(@PathVariable("id") Long id, @PathVariable("type") int type);

    @PostMapping("/picture/{type}/{id}")
    public boolean savePicture(@RequestParam List<String> url, @PathVariable int type, @PathVariable Long id);

    @DeleteMapping("/picture/{id}/{type}")
    public boolean deletePicture(@PathVariable Long id, @PathVariable int type);
}
